package day14;


public class GeometricTest {
	public static void main(String[] args) {
		//实例化类
		GeometricTest geometricTest =new GeometricTest();
		Circle circle=new Circle(5.3, "red", 10);
		MyRectangle myRectangle=new MyRectangle(10, 2.3, "blue", 15);
	    
		//多态的应用，传递的是子类对象，形参是父类对象
		geometricTest.equalsArea(circle, myRectangle);
		geometricTest.displayGeometricObject(myRectangle);
		geometricTest.displayGeometricObject(circle);
	}
	
	
	public void equalsArea(GeometricObject o1,GeometricObject o2) {
		System.out.println( o1.findArea()==o2.findArea());
	}
	
	public void displayGeometricObject (GeometricObject o) {
		System.out.println(o.findArea());
	}
	
	
	
}
